<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>个人信息</title>
	<link rel="stylesheet" href="__PUBLIC__/css/address.css">
</head>
<body>
	<div class="page">
	    <div class="header">头部</div>
		<div class="banner">
			<div class="banner-inner">
				 <div class="logo">
				 	  <a href=""><img src="__PUBLIC__/images/logo.v2.png" alt=""></a>
					  <a href="" class="a-1">我的汇一家</a>
					  <a href="{:U('Index/index')}" class="a-2">返回汇一家首页</a>
				 </div>
				 <ul>
				 	<li><a href="{:U('User/person')}">首页</a><a href=""></a></li>
				 	<li><a href="">账户设置</a></li>
				 	<li><a href="">消息</a></li>
				 </ul>
				 <form action="" method="post">
				 	<input type="text" size="21">
				 	<input type="submit" value="搜索" class="sub">
				 </form>
				 <div class="cart">
                     <a href="">我的购物车</a>
				 </div>
			</div>
		</div>
		<div class="content">
			 <div class="content-left">
			 	  <ul>
			 	  	<li>设置</li>
			 	  	<li><a href="{:U('User/userInfo')}" >个人信息</a></li>
			 	  	<li><a href="{:U('User/changepass')}">修改密码</a></li>
			 	  	<li><a href="{:U('User/address')}" style="color:red">收货地址</a></li>
			 	  	<li><a href="">消费记录</a></li>
			 	  </ul>
			 </div>
			 <div class="content-right">
			 	 <div class="min">
				      <button id="add_address">新收货地址</button>
				      <div class="fixed">
				          <div class="title">
				               <h3>添加收货地址</h3>
				               <a href="#" class="delete">
				               		<img src="__PUBLIC__/images/QQ截图20170509112527.png" alt="">
				               </a>
				          </div>
				          	      <div>
				         <form action="" method="post" onsubmit="return check()">
				              <div>
 								    <span>*</span><label for="">收货人：</label><br/>
				                    <input type="text" name="receive_person" id="receive_person">
				              </div>
				              <div>
								    <span>*</span><label for="">所在地区：</label><br/>
						             <select  id="province" name="province_id">
						                  <option value="0">请选择</option>
						             </select>
						             <select  id="city" name="city_id">
						                  <option value="0">请选择</option>
						             </select>
						             <select  id="area" name="area_id">
						                  <option value="0">请选择</option>
						             </select>
				              </div>
				              <div>
				                  <span>*</span><label for="">详细地址：</label><br/>
				                  <input type="text" id="detail" name="detail_address">
				              </div>
                              <div>
                              	   <span>*</span><label for="receive_mobile">手机号：</label><label id="label" for="receive_mobile"><br/>
                              	   <input type="text" name="receive_mobile" id="receive_mobile"><span class="span">
                              </div>
                              <input type="submit" value="保存地址" id="submit" >
				         </form>
				      </div>
				      </div>
				      <volist name="address" id="vo"> 
				          <div class="address_1">
				              <h3>{$vo.receive_person}*{$vo.province}</h3>
				              <if condition="$vo.isdefault eq 1">
				                <span id="span">默认地址</span> 
				              </if>
				              <p>收货人：<span>{$vo.receive_person}</span></p>
				              <p>所在地区：<span>{$vo.province}{$vo.city}{$vo.area}</span></p> 
				              <p>地址：<span>{$vo.detail_address}</span></p>
				              <p>手机：<span>{$vo.receive_mobile}</span></p>
                              <a href="{:U('User/deleteAddress',array('id'=>$vo['id']))}" id="a1" onclick="return confirm('你确定要删除该收货地址吗？')"><img src="__PUBLIC__/images/20170510002836.png" alt=""></a>
                              <a href="javascript:void(0)" hr="{$vo.id}" class="edit">编辑</a>
                              <a href="{:U('User/updateDefault',array('id'=>$vo['id']))}" class="default">设为默认</a>
				          </div>     					               
					  </volist>
					  <div class="fixed_1">
						    <div class="title">
								   <h3>修改收货地址</h3>
								   <a href="javascript:void(0)" class="delete">
								     <img src="__PUBLIC__/images/QQ截图20170509112527.png" alt="">
								   </a>
						    </div>
						    <div>
								 <form action="__CONTROLLER__/upAddress" method="post" onsubmit="return check1()">
										<div>
											  <span>*</span><label for="">收货人：</label><br/>
										      <input type="text" name="receive_person" id="receive_person_1" value="">
										</div>
										<div>
											<span>*</span>
											<label for="">所在地区：</label><br/>
										    <select  id="province_1" name="province_id">
												<option value="" id="pro"></option> 
											</select>
										    <select  id="city_1" name="city_id">
											     <option value="" id="cit"></option>  
											</select>
											<select  id="area_1" name="area_id">
												 <option value="" id="are"></option>   
											</select>
										</div>
									    <div>
											 <span>*</span>
											 <label for="">详细地址：</label><br/>
											 <input type="text" id="detail_1" name="detail_address" value="">
										 </div>
							             <div>
							                   <span>*</span>
							                   <label for="receive_mobile">手机号：</label><br/>
							                   <input type="text" name="receive_mobile" id="receive_mobile_1" value="">
							             </div>
							             <input type="hidden" id="hidden" value="" name="id">
							             <input type="submit" value="保存地址" id="submit_1" >
							 </form>
					    </div>
	                  </div>	         
				 </div>
			 </div>
		</div>
	</div>
	<script src="__PUBLIC__/js/jquery-1.11.3.js"></script>
	<script>
	    var url="{:U('User/addressAjax')}";
	    var url_1="{:U('User/edit')}";
	</script>
	<script src="__PUBLIC__/js/address.js"></script>
</body>
</html>